package com.just.login.Utils;

import com.just.login.Model.User;
import org.apache.shiro.crypto.hash.Md5Hash;

public class Md5Utils {

    public static User md5(User user) {
        Md5Hash hash = new Md5Hash(user.getPassword(), user.getSalt());
        user.setPassword(hash.toHex());
        return user;
    }
}
